<script setup lang="ts">
    import TestPropsEmit from './components/test-props-emit/index.vue'
    import { ref, onMounted } from 'vue'

    const msg = ref('欢迎学习vite')

    const handleChange = (val:string) => {
        // console.log(val)
    }

    const propsEmitRef = ref()
    onMounted(() => {
        console.log(propsEmitRef.value.child)
        propsEmitRef.value.childNodeFunc()
    })

    function created () {
        console.log('created')
    }
    created()
</script>

<template>
    <TestPropsEmit ref="propsEmitRef" :msg="msg" @on-change="handleChange"></TestPropsEmit>
</template>

<style>
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
}
</style>
